import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'login',
      component: () => import('@/views/Login.vue'),
    },
    {
      path: '/main',
      name: 'main',
      component: () => import('@/views/Main.vue'),
      children:[
        {
          path: '/GoodsTypes',
          name: 'GoodsTypes',
          component: () => import('@/views/WareHouseAllot/GoodsTypes.vue'),
        },
        {
          path: '/showwarehouse',
          name: 'showwarehouse',
          component: () => import('@/views/WreHouseManage/ShowWareHouse.vue'),
        },
        {
          path: '/addwarehouse',
          name: 'addwarehouse',
          component: () => import('@/views/WreHouseManage/AddWareHouse.vue'),
        },
        // {
        //   path: '/warehouse-detail/:id',
        //   name: 'WarehouseDetail',
        //   component: () => import('@/views/WreHouseManage/WareHiuseDetail.vue')
        // },
        {
          path: '/Dify',
          name: 'Dify',
          component: () => import('@/views/Dify.vue'),
        },
        {
          path: '/WareHouseCheck',
          name: 'WareHouseCheck',
          component: () => import('@/views/WareHouseCheck/WareHouseCheck.vue'),
        },
        {
          path: '/StockManagement',
          name: 'StockManagement',
          component: () => import('@/views/WareHouseStatistics/StockManagement.vue'),
        },
      ]
    },
  ],
})

export default router
